package cc.linker.steplink.crm.merchanth5.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @Author: CKQ
 * @DateTime: 2020/12/17 15:54
 * @Description: TODO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RegisterActivityPo {
    //活动ID
    private String activityId;
    //活动名称
    private String activityName;
    //活动类型
    private Integer activityType;
    //活动开始时间
    private Date startTime;
    //活动结束时间
    private Date endTime;
    //创建时间
    private Date createTime;
    //编辑时间
    private Date updateTime;
    //创建用户ID
    private String createUserId;
    //机构ID
    private String orgId;
    //积分
    private Integer integral;
    //成长值
    private Integer growth;

    //状态 0 暂停 1 启用
    private Integer status;

    //是否开启优惠券0 否1是
    private Integer isCoupon;

    //是否开启积分 0 否1是
    private Integer isIntegral;

    //是否开启成长值 0 否1是
    private Integer isGrowth;

    //当前状态
    public String getStatusTip() {
        if (this.endTime.compareTo(new Date()) < 0) {
            return "已结束";
        } else {

            if (this.status == 0) {
                return "已暂停";
            }
            if (this.startTime.compareTo(new Date()) >= 0) {
                return "未开始";
            } else {
                return "进行中";
            }
        }
    }

    //赠送优惠券列表
    private List<GiveCouponPo> giveCouponPoList;

    private Integer couponNum;
}

